package com.darthsith.droidathome.core.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Model class for Device
 * 
 * @author andrea
 *
 */

@Entity
@Table(name="DEVICE")
public class Device {
	
	@Id
	@Column(name="MACADDRESS")
	private String macAddress;
	@Column(name="NAME")
	private String name;
	
	public Device() {}
	
	public Device(String macAddress, String name) {
		this.macAddress=macAddress;
		this.name=name;
	}
	
	public String getMacAddress() {
		return macAddress;
	}
	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "[DEVICE NAME: "+name+", MAC ADDRESS: "+macAddress+"]";
	}
	
}
